package znzz.quartz.job;

import org.quartz.Job;
import org.quartz.JobExecutionContext;
import org.quartz.JobExecutionException;

import java.text.SimpleDateFormat;
import java.util.Date;

/**
 * 简单的job测试
 *
 * Created by wangjwm on 2017/7/25.
 */
public class SimpleJob implements Job {

    public void execute(JobExecutionContext context) throws JobExecutionException {
        SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy年MM月dd日 HH:mm:ss");
        System.out.println(dateFormat.format(new Date() + " : ") + context.getJobDetail().getKey());
    }
}
